package factory.simple;

import factory.Asus;
import factory.Computer;
import factory.Lenvo;
import factory.MacBook;

/**
 * Created by liuweijie on 2018/4/24.
 */
public class SimpleFactory {

    public Computer getComputer(String name){

        switch (name){
            case "Lenvo":return new Lenvo();
            case "Asus":return new Asus();
            case "MacBook":return new MacBook();
            default:return null;
        }

    }
}
